
from django.shortcuts import render
from django.http import HttpResponse
from user.models import *
# Create your views here.
# 视图函数Views


def index(request):
    pass
    # # 返回响应
    # return HttpResponse('hello, django!')

    # 渲染米板render， 渲染html
    return render(request, 'index.html')

# 视图函数
def get_users(request):
    # 模型操作， 获取所有user
    users = UserModel.objects.all()
    return render(request, 'users.html', {'users': users})